<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<style type="text/css">
</style>
<script type="text/javascript">
	function addOrUpdateUser(){
		var r = $('#aaaForm').form('validate');
		if(!r) {
			return false;
		}
	    if($('#id').val()!='')
	    {
			$.post("aaa/aaaAdd",$("#aaaForm").serializeArray(),function(data){ 
				$('#MyPopWindow').window('close');
				$('#aaaTable').datagrid('reload');  
				$.messager.alert('提示',data.mes,'info');
			});
	    }else
	    {
			$.post("aaa/aaaUpdate",$("#aaaForm").serializeArray(),function(data){ 
				$('#MyPopWindow').window('close');
				$('#aaaTable').datagrid('reload');  
				$.messager.alert('提示',data.mes,'info');
			});
	    }

	}
</script>
 	<form id="aaaForm" method="post" style="margin: 10;text-align: center;">
	<table >
		<tr><td>
		<input name="version" type="hidden">
		<input id="creatuserid" type="hidden" name="creatuserid">
		<input type="hidden" name="id" id="id"> 
		</td></tr>
		<tr align="left"><td>用户姓名：</td><td><input name="username" style="width: 200" validType="length[2,12]" class="easyui-validatebox" required="true"> </td></tr>
		<tr><td>证件ID：</td><td><input name="ownercard" style="width: 200" validType="length[15,18]" class="easyui-validatebox" required="true"></td></tr>
		<tr><td>性别：   </td><td><input type="radio" value="1" name="sex">男<input type="radio" value="0" name="sex">女</td></tr>
		<tr><td>EMAIL：</td><td><input id="email" name="email"  class="easyui-validatebox" data-options="validType:'email'" style="width: 200"></td></tr>
		<tr><td>移动电话：</td><td><input  id="telephone" name="telephone" style="width: 200"></td></tr>
		<tr><td>短信通知开启：</td><td><input type="checkbox" value="1" name="usemessage"></td></tr>
		<tr><td>邮件通知开启：</td><td><input type="checkbox" value="1" name="useemail"></td></tr>
		<tr><td>用户住址：</td><td><input  id="address" name="address" style="width: 200"></td></tr>
	</table>
	<a href="#" id="btn-back" onclick="closeWindow();" class="easyui-linkbutton" iconCls="icon-back">返回</a>
	<a href="#" id="btn-add" onclick="addOrUpdateUser();" class="easyui-linkbutton" iconCls="icon-save">保存</a>
</form>